package com.fh.controller;


import com.fh.model.Users;
import com.fh.service.UserRegistService;
import com.fh.vo.ResultVo;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/user")
@CrossOrigin
public class UserRegistController {
@Resource
private UserRegistService userRegistService;



    @PostMapping("/regist")
    public ResultVo regist(@RequestBody Users users){

        return  userRegistService.regist(users.getUsername(),users.getPassword());
    }
}
